package MsgPackage;

/**
 * @author Omri Barda		039725890 
 * @author Amit Joseph		034608547
 * @author Gilad Shpigel  	300162393
 * @author Elad Elbaz		040539959
 * @version June 2012
 */

import java.util.ArrayList;
import entities.ExtractedExam;
import entities.Lecturer;

public class GetActiveExamsPack extends MessagePack {
	private static final long serialVersionUID = 1L;
	ArrayList<ExtractedExam> actvExms = null;
	private Lecturer lctrr;

	/**
	 * constructor
	 * 
	 * @param lctrr
	 */
	public GetActiveExamsPack(Lecturer lctrr) {
		this.op = OpType.GetActiveExams;
		this.lctrr = lctrr;
	}

	/**
	 * 
	 * @return the lecturer
	 */
	public Lecturer getLctrr() {
		return lctrr;
	}

	/**
	 * 
	 * @param ExmsLst
	 *            is the list of the exams
	 */
	public void addExams(ArrayList<ExtractedExam> ExmsLst) {
		if (actvExms == null)
			actvExms = new ArrayList<ExtractedExam>();
		actvExms.addAll(ExmsLst);
	}

	/**
	 * 
	 * @param Exm
	 *            to add
	 */
	public void addExam(ExtractedExam Exm) {
		if (actvExms == null)
			actvExms = new ArrayList<ExtractedExam>();
		actvExms.add(Exm);
	}

	/**
	 * 
	 * @return the list of exams
	 */
	public ArrayList<ExtractedExam> getActiveExams() {
		return actvExms;
	}

	/**
	 * 
	 * @return the size of the exam list
	 */
	public int activeExamSize() {
		return actvExms.size();
	}
}
